
Page({
  data: {
   
    indicatorDots:true,
    autoplay: true,
    interval: 5000,
    duration: 1000,
    Xiangmu: {},
  },
  yuyue: function(e) {
    
    console.log("开始："+e.currentTarget.dataset.id);
    console.log(e.currentTarget.dataset.name);
    wx.setStorage({
      key:"ipic",
      data:e.currentTarget.dataset.pic
    });
    wx.setStorage({
      key:"iid",
      data: e.currentTarget.dataset.id
    });
    wx.setStorage({
      key:"area",
      data:e.currentTarget.dataset.area
    });
    wx.setStorage({
      key:"day",
      data:e.currentTarget.dataset.day
    });
    wx.setStorage({
      key:"avatar",
      data:e.currentTarget.dataset.avatar
    });
    wx.setStorage({
      key:"name",
      data:e.currentTarget.dataset.name
    });
    wx.setStorage({
      key:"fee",
      data:e.currentTarget.dataset.fee
    });
    wx.setStorage({
      key:"experience",
      data:e.currentTarget.dataset.experience
    });
    wx.navigateTo({
        url: '../xiangqing/xiangqing'
      });
  },
  changeIndicatorDots: function(e) {
    this.setData({
      indicatorDots: !this.data.indicatorDots
    })
  },
  changeAutoplay: function(e) {
    this.setData({
      autoplay: !this.data.autoplay
    })
  },
  intervalChange: function(e) {
    this.setData({
      interval: e.detail.value
    })
  },
  durationChange: function(e) {
    this.setData({
      duration: e.detail.value
    })
  },
  upper: function(e) {
    console.log(e)
  },
  lower: function(e) {
    console.log(e)
  },
  scroll: function(e) {
    console.log(e)
  },
  tap: function(e) {
    for (var i = 0; i < order.length; ++i) {
      if (order[i] === this.data.toView) {
        this.setData({
          toView: order[i + 1]
        })
        break
      }
    }
  },
  tapMove: function(e) {
    this.setData({
      scrollTop: this.data.scrollTop + 10
    })
  },
 onLoad:function(){
   var thispage = this;
   wx.request({
     url: 'http://localhost:8080/selectItemsAllInfo',
     data: {

     },
     method: 'GET',
     header: {
       'content-type': 'application/json' // 默认值
     },
     success: function (res) {

       console.log(res)
       console.log(res.data[0])
       console.log(res.data[1])

       thispage.setData({ Xiangmu: res.data })

     },
     complete: function (res) {



     }
   });
 }
})
